<template>
  <div>
    <van-nav-bar
      class="topbu"
      title="房屋管理"
      left-arrow
      @click-left="$router.go(-1)"
    />
    <Commodity v-if="list.length"></Commodity>
    <van-empty description="描述文字" v-else>
      <template #description>
        <span
          >您还没有房源，<router-link to="/gohire">去发布房源</router-link
          >吧~</span
        >
      </template>
    </van-empty>
  </div>
</template>

<script>
import { getGorent } from '@/api/user'
import Commodity from '@/components/commodity.vue'
export default {
  components: {
    Commodity
  },
  name: 'Gorent',
  props: {},
  data () {
    return {
      list: []
    }
  },
  async created () {
    const data = await getGorent()
    console.log(data)
  }
}
</script>

<style scoped lang="less"></style>
